<link rel="stylesheet" href="/ceca_two/css/costShareOne.css" />
<!--header-->
<!--# include virtual="/ceca_two/common/html/header.html"-->
<!--# include virtual="/ceca_two/modules/costnorm/base/costShare.html"-->	
<style type="text/css">
	input::-webkit-outer-spin-button,
	input::-webkit-inner-spin-button {
	  -webkit-appearance: none;
	}
	input[type="number"]{
	  -moz-appearance: textfield;
	}
	tr td:last-child {
		overflow: hidden;
	}
	tr td:last-child span{
		width: 230px;
		display: block;
		overflow: hidden;
		text-indent: 2em;
		text-overflow: ellipsis;
		line-height: 40px;
		max-height: 40px;
		white-space: nowrap;
	}
</style>
		<h1 class="shareName">工程概况</h1>
		<div class="explain">填写说明：以下内容均为必填项，若本项目无此项内容请填写“无”。</div>
		<table class="shareTable">
			<tr>
				<td>序号</td>
				<td>项目名称</td>
				<td class="property">属性值</td>
				<td style="color: #fff;">备注</td>
			</tr>
			<tr>
				<td class="xh">1</td>
				<td>工程名称</td>
				<td class="property">
					<input type="text" name="costName" id="costName" value="" placeholder="请输入工程名称"/>
				</td>
				<td><span title="请按照“工程造价咨询成果文件”名称填写">请按照“工程造价咨询成果文件”名称填写</span></td>
			</tr>
			<tr>
				<td class="xh">2</td>
				<td>工程分类</td>
				<td  class="property proL" id="catalog">
					<div class="classify">
						<span>请选择</span>
						<ul class="classifyList"></ul>
					</div>
					<div class="classify"  style="display: none;" >
						<span>请选择</span>
						<ul class="classifyList"></ul>
					</div>
					<div class="classify" style="display: none;">
						<span>请选择</span>
						<ul class="classifyList"></ul>
					</div>
				</td>
				<td></td>
			</tr>
			<tr class="syxz" style="display: none;">
				<td class="xh">3</td>
				<td>建筑使用性质</td>
				<td  class="property">
					<div class="classify nature"  id="nature">
						<span class="">请先选择工程分类</span>
						<ul class="classifyList" style="display: none;width: 230px;">
						</ul>
					</div>
				</td>
				<td></td>
			</tr>
			<tr class="jjzb" style="display: none;">
				<td class="xh">4</td>
				<td class="sortName">技术经济指标</td>
				<td  class="property" id="technical">
					<span style="float: left;text-indent: 20px;">请先选择工程分类</span>
					<!--<div class=" nature" style="border: none;" id="technical">
						<span style="float: left;text-indent: 20px;"></span>
					</div>-->
				</td>
				<td></td>
			</tr>
			
			
			
			<tr>
				<td class="xh">3</td>
				<td>工程地点</td>
				<td  class="property">
					<div class="classify site" id="city">
						<span>请选择省市</span>
						<ul class="classifyList classifyListArea">
							
						</ul>
					</div>
					<div class="classify site" style="border: none;" id="any">
						<span>全部</span>
						<ul class="classifyList classifyListArea"></ul>
					</div>
				</td>
				<td title="包含地上和地下建筑面积"><span>包含地上和地下建筑面积</span></td>
			</tr>
			<tr>
				<td rowspan="3" class="xh">4</td>
				<td><span class="level"></span>总建筑面积</td>
				<td  class="property">
					<input type="number" class="areaInp" id="allArea" />
					<span class="pfm">平方米</span>
				</td>
				<td></td>
			</tr>
			<tr>
				<td>地上</td>
				<td  class="property">
					<input type="number"  id="onGround" />
				</td>
				<td></td>
			</tr>
			<tr>
				<td>地下</td>
				<td  class="property">
					<div class="classify nature">
						<span id="underGround">请选择</span>
						<ul class="classifyList" id="underArea">
							<li>0</li>
							<li>不为0</li>
						</ul>
					</div>
					<div id="dxsmj">
						<input type="number" name=""  value="" placeholder="请输入地下建筑面积" />
						<span>平方米</span>
					</div>
				</td>
				<td></td>
			</tr>
			<tr>
				<td rowspan="6" class="xh">5</td>
				<td><span class="level"></span>建筑总高度</td>
				<td  class="property">
					<input type="number" class="areaInp" id="totalHeight"/>
					<span class="pfm">米</span>
				</td>
				<td title="指从室外地坪到建筑檐口的高度，不包含屋顶水箱间、电梯机房、排烟机房和楼梯出口等"><span>指从室外地坪到建筑檐口的高度，不包含屋
顶水箱间、电梯机房、排烟机房和楼梯出口等</span></td>
			</tr>
			<tr>
				<td>首层</td>
				<td  class="property">
					<input type="number" class="areaInp" id="firstHeight"/>
					<span class="pfm">米</span>
				</td>
				<td></td>
			</tr>
			<tr>
				<td>二层</td>
				<td  class="property">
					<input type="number" class="areaInp" id="secondHeight"/>
					<span class="pfm">米</span>
				</td>
				<td></td>
			</tr>
			<tr>
				<td>标准层</td>
				<td  class="property">
					<input type="number" class="areaInp" id="standardHeight"/>
					<span class="pfm">米</span>
				</td>
				<td></td>
			</tr>
			<tr>
				<td>顶层</td>
				<td  class="property">
					<input type="number" class="areaInp" id="topHeight"/>
					<span class="pfm">米</span>
				</td>
				<td></td>
			</tr>
			<tr>
				<td>其他非标准层</td>
				<td  class="property">
					<div class="other" style="width: 308px;">
						<input type="number" class="areaInp" id="otherHeight"/>
						<span>米</span>
					</div>
					<div class="other" style="border: none;"/>
						<span class="szcs">所在层数</span>
						<input type="text" class="areaInp" id="otherFloor" >
						<span>层</span>
					</div>
				</td>
				<td title="非必填项，如有，请填写"><span>非必填项，如有，请填写</span></td>
			</tr>
			<tr>
				<td rowspan="3" class="xh">6</td>
				<td><span class="level"></span>建筑总层数（层）</td>
				<td  class="property">
					<input type="text" class="areaInp" id="allFloor" onkeypress="return event.keyCode>=48&amp;&amp;event.keyCode<=57" ng-pattern="/[^a-zA-Z]/"/>
					<span class="second">层</span>
				</td>
				<td title="包含地下层数和地上层数"><span>包含地下层数和地上层数</span></td>
			</tr>
			<tr>
				<td>地上（层）</td>
				<td  class="property">
					<input type="text" class="areaInp overUp" id="upFloor" onkeypress="return event.keyCode>=48&amp;&amp;event.keyCode<=57" ng-pattern="/[^a-zA-Z]/"/>
					<span class="second">层</span>
				</td>
				<td></td>
			</tr>
			<tr>
				<td>地下（层）</td>
				<td  class="property">
					<input type="text" class="areaInp overUp" id="downFloor" onkeypress="return event.keyCode>=48&amp;&amp;event.keyCode<=57" ng-pattern="/[^a-zA-Z]/"/>
					<span class="second">层</span>
				</td>
				<td></td>
			</tr>

			<tr>
				<td rowspan="6" class="xh">7</td>
				<td><span class="level"></span>地下室</td>
				<td  class="property">

				</td>
				<td></td>
			</tr>
			<tr>
				<td>层高</td>
				<td  class="property">
					<input type="number" class="areaInp overUp" id="downFloorHeight" />
					<span class="second">米</span>
				</td>
				<td title="如地下室不止一层，且层高不相同，请分别列出各层层高，中间用逗号隔开"><span>如地下室不止一层，且层高不相同，请分别
列出各层层高，中间用逗号隔开</span></td>
			</tr>
			<tr>
				<td>功能用途</td>
				<td  class="property" id="checkBox">
					<input type="checkbox" name="features" id="garage" value="车库" style="margin-left: 30px;" class="third"/><label for="garage">车库</label>
					<input type="checkbox" name="features" id="bicycle" value="自行车库"  class="third" /><label for="bicycle">自行车库</label>
					<input type="checkbox" name="features" id="facility" value="设备管线"  class="third" /><label for="facility">设备管线</label>
					<input type="checkbox" name="features" id="storeroom" value="储藏室"  class="third" /><label for="storeroom">储藏室</label>
					<input type="checkbox" name="features"  id="othercheck" value="其他" class="third"/><label for="othercheck" style="text-indent: 0;margin-right:0 ;">其他</label>
					<input type="text"  value="" style="width: 90px;border: none;border-bottom: 1px solid #ccc;" id="othervale"/>
				</td>
				<td></td>
			</tr>
			<tr>
				<td>层数</td>
				<td  class="property">
					<input type="text" class="areaInp overUp" id="downFloorNum" onkeypress="return event.keyCode>=48&amp;&amp;event.keyCode<=57" ng-pattern="/[^a-zA-Z]/"/>
					<span class="second">层</span>
				</td>
				<td></td>
			</tr>
			<tr>
				<td><span class="level"></span>建筑面积</td>
				<td  class="property">
					<input type="number" class="areaInp" id="acreage"/>
					<span class="second">平方米</span>
				</td>
				<td></td>
			</tr>
			<tr>
				<td style="text-indent: 60px;">其中人防面积</td>
				<td  class="property">
					<input type="number" class="areaInp" id="otherAcreage" />
					<span class="second">平方米</span>
				</td>
				<td></td>
			</tr>
			<tr>
				<td class="xh">8</td>
				<td>是否包含裙楼</td>
				<td  class="property">
					<div class="classify nature" style="border: none;float: left;height: 40px;padding-right: 20px;">
						<span id="crony">请选择</span>
						<ul class="classifyList" id="qdl">
							<li>是</li>
							<li>否</li>
						</ul>
					</div>
					<div class="qdl" style="display: none;">
						<ul><li>裙房层数</li><li><input type="text" name="" id="" value="" onkeypress="return event.keyCode>=48&amp;&amp;event.keyCode<=57" ng-pattern="/[^a-zA-Z]/"/></li></ul>
						<ul><li>裙房层高</li><li><input type="number" name="" id="" value="" /></li></ul>
						<ul><li>裙房面积</li><li><input type="number" name="" id="" value="" /></li></ul>
						<ul><li>功能</li><li><input type="text" name="" id="" value="" /></li></ul>
					</div>
				</td>
				<td></td>
			</tr>
			<tr>
				<td class="xh">9</td>
				<td>是否坡屋顶</td>
				<td  class="property">
					<div class="classify nature" style="border: none;float: left;height: 40px;padding-right: 20px;">
						<span id="roof">请选择</span>
						<ul class="classifyList" id="pwd">
							<li>是</li>
							<li>否</li>
						</ul>
					</div>
					<div class="pwd">
						<ul>
							<li>是否有屋顶造型</li>
							<li style="width: 339px;">
								<div>请选择</div>
								<dl>
									<dd>是</dd>
									<dd>否</dd>
								</dl>
							</li>
						</ul>
					</div>
				</td>
				<td title="屋顶造型指花架、屋顶花园等"><span>屋顶造型指花架、屋顶花园等</span></td>
			</tr>
			<tr>
				<td class="xh">10</td>
				<td>是否有电梯</td>
				<td  class="property">
					<div class="classify nature" style="border: none;float: left;height: 40px;padding-right: 20px;">
						<span class="snfi">请选择</span>
						
						<ul class="classifyList" id="elevator">
							<li>是</li>
							<li>否</li>
						</ul>
					</div>
					<div class="elevator">
						<ul><li>电梯的数量</li><li><input type="text" name="" id="" value="" onkeypress="return event.keyCode>=48&amp;&amp;event.keyCode<=57" ng-pattern="/[^a-zA-Z]/"/></li>台</ul>
					</div>
				</td>
				<td></td>
			</tr>
			<tr>
				<td class="xh">11</td>
				<td>抗震设防烈度</td>
				<td  class="property">
					<div class="classify nature" style="border: none;">
						<span id="shock">请选择</span>
						<ul class="classifyList">
							<li>5度</li>
							<li>6度</li>
							<li>7度</li>
							<li>8度</li>
							<li>9度</li>
						</ul>
					</div>
				</td>
				<td></td>
			</tr>
			<tr>
				<td class="xh">12</td>
				<td>结构类型</td>
				<td  class="property">
					<div class="classify nature" style="border: none;">
						<span id="structure">请选择</span>
						<ul class="classifyList">
							<li>框架结构</li>
							<li>剪力墙结构</li>
							<li>框架-剪力墙结构</li>
							<li>筒体结构</li>
							<li>部分框支剪力墙结构</li>
							<li>板柱-剪力墙结构</li>
							<li>钢结构</li>
							<li>砖混结构</li>
							<li>其他结构</li>
						</ul>
					</div>
				</td>
				<td></td>
			</tr>
			<tr>
				<td class="xh">13</td>
				<td>基础类型</td>
				<td  class="property">
					<div class="classify nature" style="border: none;">
						<span id="basis">请选择</span>
						<ul class="classifyList">
							<li>筏板基础</li>
							<li>桩基</li>
							<li>条形基础</li>
							<li>独立基础</li>
							<li>箱型基础</li>
							<li>其他基础</li>
						</ul>
					</div>
				</td>
				<td></td>
			</tr>
			<tr>
				<td class="xh">14</td>
				<td>计价方式</td>
				<td  class="property">
					<div class="classify nature" style="border: none;">
						<span id="valuation">请选择</span>
						<ul class="classifyList">
							<li>清单计价</li>
							<li>定额计价</li>
						</ul>
					</div>
				</td>
				<td></td>
			</tr>
			<tr>
				<td class="xh">15</td>
				<td>造价阶段</td>
				<td  class="property">
					<div class="classify nature" style="border: none;">
						<span id="cost">请选择</span>
						<ul class="classifyList">
							<li>招标控制价</li>
							<li>标底价</li>
							<li>投标价</li>
							<li>合同价</li>
							<li>结算价</li>
							<li>设计概算</li>
							<li>施工图预算</li>
							<li>竣工决算</li>
						</ul>
					</div>
				</td>
				<td></td>
			</tr>
			<tr>
				<td rowspan="4" class="xh">16</td>
				<td><span class="level"></span>计价依据</td>
				<td  class="property"></td>
				<td></td>
			</tr>
			<tr>
				<td>清单依据</td>
				<td  class="property">
					<div class="classify nature" style="border: none;">
						<span id="norm">请选择</span>
						<ul class="classifyList">
							<li>2003版清单计价规范</li>
							<li>2008版清单计价规范</li>
							<li>2013版清单计价规范</li>
						</ul>
					</div>
				</td>
				<td></td>
			</tr>
			<tr>
				<td>定额依据</td>
				<td  class="property">
					<input type="text" class="areaInp" id="quota"/>
					<span></span>
				</td>
				<td></td>
			</tr>
			<tr>
				<td>信息价依据</td>
				<td  class="property">
					<input type="text" class="areaInp" id="informationPrice"/>
				</td>
				<td></td>
			</tr>
			<tr>
				<td class="xh">17</td>
				<td>计价日期</td>
				<td  class="property">
					<div class="layui-input-block" style="margin-left: 0px">
  						<input class="layui-input" onclick="layui.laydate({elem: this, festival: true})" placeholder="选择日期" style="border: none;cursor: pointer;" id="infoData">
					</div>
				</td>
				<td></td>
			</tr>
			<tr>
				<td class="xh">18</td>
				<td>工程总造价</td>
				<td  class="property">
					<input type="number" class="areaInp" id="money" />
					<span class="second">万元</span>
				</td>
				<td></td>
			</tr>
		</table>
		<div class="shareCostBtn">
			<div class="saveBtn" style="margin: 50px 20px 50px 477px;">
				<a  onclick="history.go(-1);" href="javascript:;">返回</a>
			</div>
			<div class="nextBtn">
				<a>保存并下一步</a>
			</div>
		</div>
	</div>
</div>
<div id="tip" style="width: 1240px;padding: 0px 0px 20px;color: red;text-align: center;background: #fff;display: none;margin: 0 auto;"></div>
<!--<div id="qwer" style="position: fixed;top: 100px;left: 20px;width: 50px;height: 59px;background: #000000;"></div>-->
<script src="/ceca_two/js/costnorm/oneVerification.js" type="text/javascript" charset="utf-8"></script>
<script>	
layui.use(['costshareOne','laydate','sharecity'], function(){


if (sessionStorage.getItem('civilOne')) {
	var temporary = JSON.parse(sessionStorage.getItem('civilOne'));
	
	$(".shareUnit").html(temporary.arrangement);
	$("#costName").val(temporary.projectName);
	$("#costName").val(temporary.costName);	//工程名称
	$("#allArea").val(temporary.projectAllArea);
	$("#allArea").val(temporary.constructionArea);
	$("#onGround").val(temporary.projectOnGround);
	$("#underGround").html(temporary.projectUnderGround);
	$("#dxsmj input").val(temporary.projectUnderGroundArea);
				
				//总建筑高度
	$("#totalHeight").val(temporary.projectHeight);
	$("#firstHeight").val(temporary.firstHeight);
	$("#secondHeight").val(temporary.secondHeight);
	$("#standardHeight").val(temporary.standardHeight);
	$("#topHeight").val(temporary.topHeight);
	$("#otherHeight").val(temporary.otherHeight);
	$("#otherFloor").val(temporary.otherFloor);
	$("#allFloor").val(temporary.allFloor);
				
	$("#upFloor").val(temporary.upFloor);
	$("#upFloor").val(temporary.floorNumber);
	$("#downFloor").val(temporary.downFloor);
	$("#downFloor").val(temporary.underNumber);
				
				//地下室
	$("#downFloorHeight").val(temporary.downFloorHeight);
	
	$("#downFloorNum").val(temporary.downFloorNum);
	$("#acreage").val(temporary.acreage);
	$("#otherAcreage").val(temporary.otherAcreage);
				
	$("#crony").html(temporary.crony);
	$(".qdl input").eq(0).val(temporary.cronyNumber);
	$(".qdl input").eq(1).val(temporary.cronyHeight);
	$(".qdl input").eq(2).val(temporary.cronyArea);	
	$(".qdl input").eq(3).val(temporary.cronyFeatures);
		//电梯
	$(".elevator input").val(temporary.elevatorNumber);
	$("#roof").html(temporary.roof);
	$(".pwd div").html(temporary.roofHtml);
	$("#shock").html(temporary.shock);
	$("#basis").html(temporary.basis);
	$("#structure").html(temporary.structure);
	$("#structure").html(temporary.structureType);
	$("#valuation").html(temporary.valuation);
	$("#cost").html(temporary.cost);
	$("#cost").html(temporary.costType);
	$("#norm").html(temporary.norm);
	$("#quota").val(temporary.quota);
	$("#informationPrice").val(temporary.informationPrice);
	$("#infoData").val(temporary.infoData);
	$("#infoData").val(temporary.compilationTime);
	$("#money").val(temporary.allMoney);
	$("#city span").html(temporary.address1);
	$("#any span").html(temporary.address2);
	$("#underGround").html(temporary.projectUnderGround);

	if (temporary.projectUnderGround == "不为0") {
		$("#dxsmj").show();
		$("#dxsmj input").val(temporary.projectUnderGroundArea);
	}
	
	$("#crony").html(temporary.crony)
	
	if (temporary.crony === "是") {
		$(".qdl").show();
		$(".qdl input").eq(0).val(temporary.cronyNumber);
		$(".qdl input").eq(1).val(temporary.cronyHeight);
		$(".qdl input").eq(2).val(temporary.cronyArea);		
		$(".qdl input").eq(3).val(temporary.cronyFeatures);
	}
	
	$("#roof").html(temporary.roof);	
	if(temporary.roof == "否"){
		$(".pwd").show();
		$(".pwd div").html(temporary.roofHtml);
	}
			
	$(".snfi").html(temporary.elevator);
	if (temporary.elevator == "是") {
		$(".elevator").show();
		$(".elevator input").val(temporary.elevatorNumber);
	}
}


$("#othervale").on("input propertychange",function (){
	$("#othercheck").attr("value",$(this).val());
})

$(".nextBtn a").on("click",function (){

		if (verification()) {
			
		var downArr = [] ;
		var second,third ;
		
		for (i = 0 ; i < $("input[name='features']:checked").length ; i++) {
		 	downArr.push($("input[name='features']:checked").eq(i).val());
		}
			
		for (i = 0 ; i < $("#catalog>div").length ; i++) {
			
			if ( $("#catalog>div").eq(i).is(":hidden") === false ) {
				
				i === 1 ? second = $("#catalog>div").eq(1).find("span").html() : "" ;
				i === 2 ? third = $("#catalog>div").eq(2).find("span").html(): "" ;
				
			}
		}
		third === undefined ? third = "" : "" ;
		
		var data = {
			arrangement : $(".shareUnit").html(),
			projectName : $("#costName").val(),	//工程名称
			costName : $("#costName").val(),	//工程名称
			catalogId : $("#catalog").attr("data-catalogId"),	//工程分类
			catalogSecond : second,	//工程分类
			catalogThird : third,	//工程分类
			address : $("#city span").eq(0).html()+$("#any span").eq(0).html(),   //工程地点
			address1 : $("#city span").eq(0).html(),   //工程地点
			address2 : $("#any span").eq(0).html(),   //工程地点
			//总建筑面积
			projectAllArea : $("#allArea").val(),
			constructionArea : $("#allArea").val(),
			projectOnGround : $("#onGround").val(),
			projectUnderGround : $("#underGround").html(),
			projectUnderGroundArea : $("#dxsmj input").val(),
			
			//总建筑高度
			projectHeight : $("#totalHeight").val(),
			firstHeight : $("#firstHeight").val() ,
			secondHeight : $("#secondHeight").val(),
			standardHeight : $("#standardHeight").val(),
			topHeight : $("#topHeight").val(),
			otherHeight : $("#otherHeight").val(),
			otherFloor : $("#otherFloor").val(),
			
			//层数
			allFloor : $("#allFloor").val(),
			
			upFloor : $("#upFloor").val(),
			floorNumber : $("#upFloor").val(),
			downFloor : $("#downFloor").val(),
			underNumber : $("#downFloor").val(),
			
			//地下室
			downFloorHeight : $("#downFloorHeight").val(),	//层高
			downUse : downArr,	//功能用途
			downFloorNum : $("#downFloorNum").val(),	//层数
			acreage : $("#acreage").val(),	//建筑面积
			otherAcreage : $("#otherAcreage").val(),	//其中人防面积
			
			crony : $("#crony").html(),	//是否包含裙楼
			cronyNumber : $(".qdl input").eq(0).val(),
			cronyHeight : $(".qdl input").eq(1).val(),
			cronyArea   : $(".qdl input").eq(2).val(),		
			cronyFeatures : $(".qdl input").eq(3).val(),
			
			
			elevator : $(".snfi").html(),	//电梯
			elevatorNumber : $(".elevator input").val(),	//电梯
			
			roof : $("#roof").html(),	//	是否坡屋顶
			roofHtml : $(".pwd div").html(),	//	是否坡屋顶
			shock : $("#shock").html(),	//抗震设防烈度
			basis : $("#basis").html(),	//结构类型
			structure : $("#structure").html(),	//基础类型
			structureType : $("#structure").html(),	//基础类型
			valuation : $("#valuation").html(),	//	计价方式
			cost : $("#cost").html(),//	造价
			costType : $("#cost").html(),//	造价
			
			//计价依据
			norm : $("#norm").html(),
   			quota : $("#quota").val(),
   			informationPrice : $("#informationPrice").val(),

   			infoData : $("#infoData").val(),	//计价日期
   			compilationTime : $("#infoData").val(),	//计价日期
			allMoney : $("#money").val(),	//工程总造价
			unitCost : ($("#money").val()*10000)/$("#allArea").val()
		};
		
		if ($(".syxz").hasClass("hasBlock")) {
			data.architecturalNature = $("#nature span").eq(0).html() ;
		} 
		if ($(".jjzb").hasClass("hasBlock")) {
			data.sortName = $(".sortName").html();
			data.sortValue = $("#sortValue").val();
		}
		
		data.survey = JSON.stringify(data);	//工程概况,将该页面所有的参数toSting之后上传
		sessionStorage.setItem("civilOne", data.survey);
		$.ajax({
			type:"post",
			url:"/guidance_service/front/costIndex/add.do",
			data:data,
			success:function (result){

				data.projectUnderGround === "0" ? window.location.href = "/ceca_two/modules/share/civil/two.html?costId="+result.data.costId+"&catalogId="+result.data.catalogId+"&type=0":"" ;
				data.projectUnderGround === "不为0" ? window.location.href = "/ceca_two/modules/share/civil/two.html?costId="+result.data.costId+"&catalogId="+result.data.catalogId+"&type=1":"" ;
				
			},error:function (){
				layer.msg("请求错误！请稍候重试",{icon:2,time:3000});
			}
		});
		}
		
		
})
	setInterval(function (){
		savaDate()
	},3000)
function savaDate (){
	
		var downArr = [] ;
		var second,third ;
		
		for (i = 0 ; i < $("input[name='features']:checked").length ; i++) {
		 	downArr.push($("input[name='features']:checked").eq(i).val());
		}
			
		for (i = 0 ; i < $("#catalog>div").length ; i++) {
			
			if ( $("#catalog>div").eq(i).is(":hidden") === false ) {
				
				i === 1 ? second = $("#catalog>div").eq(1).find("span").html() : "" ;
				i === 2 ? third = $("#catalog>div").eq(2).find("span").html(): "" ;
				
			}
		}
		
		third === undefined ? third = "" : "" ;
		
		var data = {
			arrangement : $(".shareUnit").html(),
			projectName : $("#costName").val(),	//工程名称
			costName : $("#costName").val(),	//工程名称
			catalogId : $("#catalog").attr("data-catalogId"),	//工程分类
			catalogSecond : second,	//工程分类
			catalogThird : third,	//工程分类
			address1 : $("#city span").eq(0).html(),   //工程地点
			address2 : $("#any span").eq(0).html(),   //工程地点
			//总建筑面积
			projectAllArea : $("#allArea").val(),
			constructionArea : $("#allArea").val(),
			projectOnGround : $("#onGround").val(),
			projectUnderGround : $("#underGround").html(),
			projectUnderGroundArea : $("#dxsmj input").val(),
			
			//总建筑高度
			projectHeight : $("#totalHeight").val(),
			firstHeight : $("#firstHeight").val() ,
			secondHeight : $("#secondHeight").val(),
			standardHeight : $("#standardHeight").val(),
			topHeight : $("#topHeight").val(),
			otherHeight : $("#otherHeight").val(),
			otherFloor : $("#otherFloor").val(),
			
			//层数
			allFloor : $("#allFloor").val(),
			
			upFloor : $("#upFloor").val(),
			floorNumber : $("#upFloor").val(),
			downFloor : $("#downFloor").val(),
			underNumber : $("#downFloor").val(),
			
			//地下室
			downFloorHeight : $("#downFloorHeight").val(),	//层高
			downUse : downArr,	//功能用途
			downFloorNum : $("#downFloorNum").val(),	//层数
			acreage : $("#acreage").val(),	//建筑面积
			otherAcreage : $("#otherAcreage").val(),	//其中人防面积
			
			crony : $("#crony").html(),	//是否包含裙楼
			cronyNumber : $(".qdl input").eq(0).val(),
			cronyHeight : $(".qdl input").eq(1).val(),
			cronyArea   : $(".qdl input").eq(2).val(),		
			cronyFeatures : $(".qdl input").eq(3).val(),
			
			
			elevator : $(".snfi").html(),	//电梯
			elevatorNumber : $(".elevator input").val(),	//电梯
			
			roof : $("#roof").html(),	//	是否坡屋顶
			roofHtml : $(".pwd div").html(),	//	是否坡屋顶
			shock : $("#shock").html(),	//抗震设防烈度
			basis : $("#basis").html(),	//结构类型
			structure : $("#structure").html(),	//基础类型
			structureType : $("#structure").html(),	//基础类型
			valuation : $("#valuation").html(),	//	计价方式
			cost : $("#cost").html(),//	造价
			costType : $("#cost").html(),//	造价
			
			//计价依据
			norm : $("#norm").html(),
   			quota : $("#quota").val(),
   			informationPrice : $("#informationPrice").val(),

   			infoData : $("#infoData").val(),	//计价日期
   			compilationTime : $("#infoData").val(),	//计价日期
			allMoney : $("#money").val(),	//工程总造价
			unitCost : (Number($("#money").val())*10000)/$("#allArea").val()
		};
		
		if ($(".syxz").hasClass("hasBlock")) {
			data.architecturalNature = $("#nature span").eq(0).html() ;
		} 
		if ($(".jjzb").hasClass("hasBlock")) {
			data.sortName = $(".sortName").html();
			data.sortValue = $("#sortValue").val();
		}	
	
		sessionStorage.setItem("civilOne", JSON.stringify(data));
}
	
	
$(".classifyList li").on("click",function (){
	$(this).parent().hide();
	$(this).parent().prev("span").html($(this).html());
})	
$("input").on("focus",function (){
	$(this).css({"border":"1px solid #FF3030"})
}).on("blur",function (){
	$(this).css({"border":"none"})
})
	
	
	
});

joint($("#downFloor"),$("#downFloorNum"));
joint($("#dxsmj input"),$("#acreage"));


function joint (input,output){
	input.on("input propertychange",function (){
		output.val($(this).val())
	})
}

$("#qdl li").on("click",function(){
	if ($(this).html() == "是") {
		$(".qdl").show();
		$(this).parents(".classify").css("borderBottom","1px solid #ccc")
	}else{
		$(".qdl").hide();
		$(this).parents(".classify").css("borderBottom","none")
	}
})
$("#elevator li").on("click",function(){
	$(".snfi").html($(this).html())
	if ($(this).html() == "是") {
		$(".elevator").show();
		$(this).parents(".classify").css("borderBottom","1px solid #ccc")
	}else{
		$(".elevator").hide();
		$(this).parents(".classify").css("borderBottom","none")
	}
})

$("#pwd li").on("click",function(){
	if ($(this).html() == "否") {
		$(".pwd").show();
		$(this).parents(".classify").css("borderBottom","1px solid #ccc")
	}else{
		$(".pwd").hide();
		$(this).parents(".classify").css("borderBottom","none")
	}
})

$(".pwd li").on("click",function (){
	$(".pwd dl").show();
})

$(".pwd dd").on("click",function (e){
	$(this).parent().prev().html($(this).html());
	$(".pwd dl").hide();
	window.event? window.event.cancelBubble = true : e.stopPropagation();
})



$("#underArea li").on("click",function (){
	var num = 9 ;
	
	if ($(this).html() == "不为0") {
		num++;
		$("#dxsmj").show();
		$(this).parents(".classify").css("borderBottom","1px solid #ccc");
		
		for (i = 18 ; i < 24 ; i++) {
			$(".shareTable tr").eq(i).show();
		}
		for (i = 24 ; i < 40 ; i++) {
			if ($(".shareTable tr").eq(i).find("td").length == 4) {

				$(".shareTable tr").eq(i).find("td").first().html(num);
				num++;
				
			}
		}
		
	}else{
$("#downFloor").val("0")
		$("#dxsmj").hide();
		$(this).parents(".classify").css("borderBottom","none");
		
		for (i = 18 ; i < 24 ; i++) {
			$(".shareTable tr").eq(i).hide();

		}
		
		for (i = 24 ; i < 40 ; i++) {
			
			if ($(".shareTable tr").eq(i).find("td").length == 4) {
				$(".shareTable tr").eq(i).find("td").first().html(num);
				num++
			}
		}
	}
})

$(document).on("click",function (){
		$(".classifyList").hide();
})


//onkeypress="return event.keyCode>=48&amp;&amp;event.keyCode<=57" ng-pattern="/[^a-zA-Z]/"
//$("input").attr({"onkeypress":"return event.keyCode>=48&&event.keyCode<=57","ng-pattern":"/[^a-zA-Z]/"})
$("#costName").removeAttr("onkeypress")
</script>
<!--底部-->
<!--# include virtual="/ceca_two/common/html/footer.html"-->
</body>
</html>